package com.healthy.support.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.healthy.support.mapper.SessionsMapper;
import com.healthy.support.domain.Sessions;
import com.healthy.support.service.ISessionsService;

/**
 * 聊天会话Service业务层处理
 * 
 * @author 束伟
 * @date 2024-03-29
 */
@Service
public class SessionsServiceImpl implements ISessionsService 
{
    @Autowired
    private SessionsMapper sessionsMapper;

    /**
     * 查询聊天会话
     * 
     * @param sessionId 聊天会话主键
     * @return 聊天会话
     */
    @Override
    public Sessions selectSessionsBySessionId(Long sessionId)
    {
        return sessionsMapper.selectSessionsBySessionId(sessionId);
    }

    /**
     * 查询聊天会话列表
     * 
     * @param sessions 聊天会话
     * @return 聊天会话
     */
    @Override
    public List<Sessions> selectSessionsList(Sessions sessions)
    {
        return sessionsMapper.selectSessionsList(sessions);
    }

    /**
     * 新增聊天会话
     * 
     * @param sessions 聊天会话
     * @return 结果
     */
    @Override
    public int insertSessions(Sessions sessions)
    {
        return sessionsMapper.insertSessions(sessions);
    }

    /**
     * 修改聊天会话
     * 
     * @param sessions 聊天会话
     * @return 结果
     */
    @Override
    public int updateSessions(Sessions sessions)
    {
        return sessionsMapper.updateSessions(sessions);
    }

    /**
     * 批量删除聊天会话
     * 
     * @param sessionIds 需要删除的聊天会话主键
     * @return 结果
     */
    @Override
    public int deleteSessionsBySessionIds(Long[] sessionIds)
    {
        return sessionsMapper.deleteSessionsBySessionIds(sessionIds);
    }

    /**
     * 删除聊天会话信息
     * 
     * @param sessionId 聊天会话主键
     * @return 结果
     */
    @Override
    public int deleteSessionsBySessionId(Long sessionId)
    {
        return sessionsMapper.deleteSessionsBySessionId(sessionId);
    }
}
